//
//  DataProcessor.h
//  RobstepToolsM2
//
//  Created by LCR on 13-9-12.
//  Copyright (c) 2013年 Robstep. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MsgDefine.h"

@protocol DataProcessorDelegate <NSObject>

- (void)getCAN_msg:(msg_pkt)msg;

@end

typedef enum {
    RX_data_start1 = 0,
    RX_data_start2,
    RX_op_code,
    RX_addr,
    RX_datas,
    RX_crc,
    RX_data_end1,
    RX_data_end2,
} enumRxStatus;

@interface DataProcessor : NSObject {
    enumRxStatus status;
    int idIndex;
    int dataIndex;
    NSMutableData *cacheData;
}

@property (nonatomic, assign)id<DataProcessorDelegate> delegate;

- (void)processInputData:(NSData*)data;

@end